public class text_10 {
    public static int add(int a ,int b){
        return a+b;
    }
    public static int add(int a,int b,int c){
        return a+b+c;
    }
    public static double add(double a,double b){
        return a+b;
    }
    public static double add(double a ,int b){
        return a+b;
    }
    public static double add(int b,double a) {
        return a+b;
    }
    public static int f(int n){
        int num;
        if(n==5){
            num = 1;
            return  num;
        }else {
            return (f(n+1)+1)*2;
        }
    }
    public static void print(int n){
        if(n<10){
            System.out.println(n);
        }else{
            print(n/10);
            System.out.println(n%10);
        }
    }
    public static int fb(int n){
        if(n==1){
            return 0;
        }
        if(n==2){
            return 1;
        }
        return fb(n-1)+fb(n-2);
    }
    public static int fb1(int n){
        if(n==1){
            return 0;
        }
        if(n==2){
            return 1;
        }
        int a = 0;
        int b = 1;
        int c = -1;
        for (int i = 3; i <=n; i++) {
            c= a+b;
            a= b;
            b =c;
        }
        return c;
    }
    public static void main(String[] args) {
   /*     int num = f(0);
        System.out.println(num);*/
        System.out.println(fb1(5));

    }
}
